# README
# R. Daniel Kelemen, Jonathan B. Slapin, Michele Fenzl, and Pit Rieger
# Out of Sight Out of Mind? Voter Attitudes about Cooperation with Radical Parties in Europe
# Journal of European Public Policy


This replication package contains data and R-scripts to replicate the main analysis of the paper as well as the additional analysis shown in the online appendix. In addition, we provide a script and raw survey data to replicate the processing done prior to the analysis. However, we also provide users with the preprocessed data in case they only want to replicate the analysis. 

Below, you find a quick explanation of how to do each of these steps. Note that for all of them, you need to properly set up the R-package "here" such that it starts at the root of the replication folder. The most simple way to achieve this is through using the KSFR23_replication.Rproj R-project.


1) Preprocess raw survey data
	run KSFR23_preprocess.R
	exports KSFR23_data_clean.Rdata &
		KSFR23_manipulation_checks.Rdata to /data (see * below; delete these files first to overwrite them)

2) Replicate main analysis: 
	run KSFR23_analysis_main.R 
		depends on KSFR23_util.R
	exports figures to /figures (see * below)

3) Replicate additional analysis in appendix:
	run KSFR23_appendix.R
		depends on KSFR23_util.R & 
			   KSFR23_analysis_otherDVs.R & 
			   KSFR23_analysis_robustness.R
	exports figures to /figures/appendix (see * below)


* Caution: When any of the scripts generates new data files or figures, it never overwrites existing ones if they already exist within this replication package. To change this behavior, take one of the following actions prior to executing the code: a) delete the corresponding files, b) remove the if-conditions around saving functions, c) change names, or d) save manually.